package com.file.system.entity.res;


public interface BaseCode {
    public static enum Common implements IMessage {
        SUCCESS(200, "成功"),
        ERROR(9999, "失败"),
        //--------------------------------------------------------------------------------------------------------------
        SYSTEM_403(403, "403"),
        SYSTEM_404(404, "404"),
        SYSTEM_405(405, "405"),
        SYSTEM_500(500, "500"),
        //--------------------------------------------------------------------------------------------------------------
        PARAM_ERROR(1001, "参数格式错误"),
        PARAM_ILLEGAL_ERROR(1002, "参数中含有非法字符"),
        PARAM_CODE_CREATE_ERROR(1003, "验证码生成失败"),
        PARAM_CODE_ERROR(1004, "验证码错误"),
        PARAM_CODE_EXIST(1005, "编码已存在"),
        PARAM_REPEAT(1006, "请勿重复提交"),
        //--------------------------------------------------------------------------------------------------------------
        USER_PASSWORD_ERROR(2001, "用户名或密码错误"),
        USER_PASSWORD_SUCCESS(2002, "登录成功"),
        USER_NOT_ONE_ERROR(2003, "系统错误，请稍后再试"),
        USER_NOT_LOGIN(2004, "未登录"),
        USER_WEAK_PASSWORD(2005, "弱密码"),
        USER_NOT_AUTH(2006, "没有权限"),
        USER_OUT(2007, "被强制下线"),
        USER_TIME_OUT(2008, "登录过期"),
        USER_OTHER_LOGIN(2009, "该账号在其他地点登录"),
        USER_HEARTBEAT(2010, "心跳检测"),
        //--------------------------------------------------------------------------------------------------------------
        MSG_NOTICE(3001, "通知"),
        MSG_PUBLIC(3002, "公告"),
        MSG_ORDINARY(3003, "消息");

        private int code;
        private String message;

        private Common(int errorCode, String message) {
            this.code = errorCode;
            this.message = message;
        }

        public int getCode() {
            return this.code;
        }

        public String getMessage() {
            return this.message;
        }
    }
}